<template>
  <div>
    <div>
      <a-button @click="goBack">返回</a-button>
    </div>
    <div
      v-for="item in data"
      :key="item"
      style="text-align: center; justify-content: center; align-content: center"
    >
      <img :src="item.src"  @click="clickImg(item.id)"/>
    </div>
  </div>
</template>

<script>
export default {
  name: "Demo",
  data() {
    return {
      data: [
        {
          id: 1,
          src: "../img/assets/img/icon1.png",
        },
        {
          id: 2,
          src: "../img/assets/img/icon2.png",
        },
        {
          id: 3,
          src: "../img/assets/img/icon3.png",
        },
        {
          id: 4,
          src: "../img/assets/img/icon4.png",
        },
        {
          id: 5,
          src: "../img/assets/img/icon5.png",
        },
        {
          id: 6,
          src: "../img/assets/img/icon6.png",
        },
        {
          id: 7,
          src: "../img/assets/img/icon7.png",
        },
        {
          id: 8,
          src: "../img/assets/img/icon8.png",
        },
        {
          id: 9,
          src: "../img/assets/img/icon9.png",
        },
      ],
    };
  },
  methods:{
    goBack() {
      this.$router.back();
    },
    clickImg(val){
        console.log(val)
       switch (val) {
        case 2:
            window.location.href="https://tms.dingtalk.com/markets/dingtalk/jxtxl?spm=a3140.12485034.1294240.1.3efa2327rruUPB";
            break;
       
        default:
            break;
       }
    },
  }
};
</script>

<style scoped></style>
